package com.cloud.magic_api.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.magic_api.entity.SysRoleAuth;
import com.cloud.magic_api.mapper.SysRoleAuthMapper;
import com.cloud.magic_api.service.ISysRoleAuthService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 角色权限
 *
 * @author yzj
 * @since 2022-08-29
 */
@Service
public class SysRoleAuthServiceImpl extends ServiceImpl<SysRoleAuthMapper, SysRoleAuth> implements ISysRoleAuthService {

    @Resource
    private SysRoleAuthMapper sysRoleAuthMapper;

    /**
     * 角色权限分页
     *
     * @author yzj
     */
    @Override
    public List<SysRoleAuth> selectSysRoleAuthList(SysRoleAuth sysRoleAuth) {
        return sysRoleAuthMapper.selectSysRoleAuthList(sysRoleAuth);
    }

    /**
     * 角色权限新增
     *
     * @author yzj
     */
    @Override
    public int insertObject(SysRoleAuth sysRoleAuth) {
        return sysRoleAuthMapper.insert(sysRoleAuth);
    }

    /**
     * 角色权限修改
     *
     * @author yzj
     */
    @Override
    public int updateObject(SysRoleAuth sysRoleAuth) {
        return sysRoleAuthMapper.updateById(sysRoleAuth);
    }

}
